package com.example.demo.information.service;

import com.example.demo.information.entity.Historyphoto;
import com.example.demo.information.entity.Photo;
import com.example.demo.information.entity.Student;
import com.example.demo.information.entity.info.StudentInfo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface PhotoService {

    List<Photo> findByXsxxIdAndStatusOrderByLrsjDesc(Long xsxxId, Integer status);

    String savePhotoByStudent(Student student, String spId, String bkColor
            , String truePath, String resultSavePath, String internetPath, String xgr);

    Photo findByXsxxIdAndXxxxIdAndBjxxId(Long xsxxId, Long xxxxId, Long bjxxId);

    Photo findById(Long id);

    String saveHistoryPhoto(Historyphoto tempPhoto);

    void downLoadStuPhoto(List<Student> stuList, HttpServletResponse response);

    void downLoadStuPhotoOwn(String fileName,Photo photo, String type, HttpServletResponse response);

    Map<String,String> stuOriginalPhotoToPassportAndSave(MultipartFile file , StudentInfo studentInfo
            , String objectName, String  fileSaveName, Date date, String localRoot);

    Map<String, String> stuPassportAndSave(MultipartFile file, StudentInfo studentInfo
            , String objectName, String fileSaveName, Date date, String localRoot, String spId, String bkColor);

    Map<String,String> stuOriginalPhotoAndSave(MultipartFile file, StudentInfo studentInfo
            , String objectName, String fileSaveName, Date date, String localRoot);

    Map<String,String> tranformOriginal(StudentInfo studentInfo, String objectName, Date date, String localRoot);
}
